(deftemplate Persoana(slot nationalitate)
    (slot pet) (slot tigari) (slot casa)
    )
(foreach ?n (create$ rus englez spaniol)
    (foreach ?p (create$ cal caine lup)
        (foreach ?t (create$ LM Kent LS)
            (foreach ?c (create$ 1 2 3)
                (assert (Persoana(nationalitate ?n)(pet ?p)(tigari ?t)(casa ?c)))
                )
            )
        )
    )
(defrule regula
    (Persoana (nationalitate ?n1 & englez) (pet ?p1) (tigari ?t1) (casa ?c1 &1))
    ;(Persoana (nationalitate ?n2 &rus ~?n1) (pet ?p2&cal ~?p1) (tigari ?n2&~?p1) (casa ?c2 &~?c1))
    )

(facts)
(run)